package com.framework.persist;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

public class JndiDataSourceFactory {

	public static DataSource getDataSource(String jndiName) throws NamingException{
		Context context = new InitialContext();
		return (DataSource) context.lookup(jndiName);
	}
}
